﻿#ifndef _ENEMYMANAGER_H_
#define _ENEMYMANAGER_H_
#include <list>
using namespace std;
//敌机管理类
class Enemy;//声明Enemy类
class EnemyManager
{
public:
	void addEnemy(Enemy* enemy);//参数：要添加敌机的指针
	void collection(Enemy* enemy);//参数：要回收敌机的指针
	static EnemyManager* getInstance() {
		if (nullptr == pInstance)
		{
			pInstance = new EnemyManager();
		}
		return pInstance;
	}
	~EnemyManager();
	void clearList();	//清空集合
	int getEnemyListNumber() const {
		return enemyList.size();
	}
public:
	list<Enemy*> enemyList;
private:
	static EnemyManager* pInstance;
	EnemyManager();

};
#endif // !_ENEMYMANAGER_H_



